Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 30, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR enhances the publishedContractOGImageTemplate function by adding address validation and shortening for the publisher's address in the Open Graph image template.

Detailed summary

  • Imported isAddress and shortenAddress from thirdweb.
  • Updated the rendering of params.publisher to check if it is a valid address.
  • If valid, the publisher's address is shortened; otherwise, the original publisher name is displayed.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel vercel bot temporarily deployed to Preview – wallet-ui October 30, 2024 22:27 Inactive
@vercel
Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 10:42pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 30, 2024 10:42pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 30, 2024 10:42pm
wallet-ui ⬜️ Skipped (Inspect) Oct 30, 2024 10:42pm

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2024

⚠️ No Changeset found

Latest commit: 09b1912

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 30, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 30, 2024 22:27 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 30, 2024 22:27 Inactive
@MananTank MananTank marked this pull request as ready for review October 30, 2024 22:27
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 30, 2024
@codecov
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.29%. Comparing base (975cd0b) to head (09b1912).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5242   +/-   ##
=======================================
  Coverage   45.29%   45.29%           
=======================================
  Files        1068     1068           
  Lines       55380    55380           
  Branches     3975     3975           
=======================================
  Hits        25082    25082           
  Misses      29606    29606           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 975cd0b
packages 40.30% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@MananTank MananTank changed the title Shorten Published image publisher address in OG image Shorten publisher address in OG image Oct 30, 2024
@MananTank MananTank changed the title Shorten publisher address in OG image Shorten publisher address in OG image on published contract page Oct 30, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 861 ms (0%) 2.5 s (+2.93% 🔺) 3.4 s
thirdweb (cjs) 102.91 KB (0%) 2.1 s (0%) 7.8 s (+18.15% 🔺) 9.8 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 162 ms (-22.29% 🔽) 259 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 109 ms (+106.12% 🔺) 119 ms
thirdweb/react (minimal + tree-shaking) 17.38 KB (0%) 348 ms (0%) 531 ms (+68.04% 🔺) 878 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 30, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the `publishedContractOGImageTemplate` function to conditionally shorten the display of the `publisher` address if it is a valid blockchain address.

### Detailed summary
- Added import for `isAddress` and `shortenAddress` from `thirdweb`.
- Updated the rendering of the `publisher` in the `<h2>` element to check if it is a valid address using `isAddress`.
- If valid, it displays the shortened address using `shortenAddress`; otherwise, it displays the full `publisher` name.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 10-31-shorten_published_image_publisher_address_in_og_image branch from 85649c2 to 09b1912 Compare October 30, 2024 22:38
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 30, 2024 22:38 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 30, 2024 22:38 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 30, 2024 22:38 Inactive
@graphite-app graphite-app bot merged commit 09b1912 into main Oct 30, 2024
30 checks passed
@graphite-app graphite-app bot deleted the 10-31-shorten_published_image_publisher_address_in_og_image branch October 30, 2024 22:42
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 30, 2024 22:42 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 30, 2024 22:42 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui October 30, 2024 22:42 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants